package com.bsfcs.rag.repository;

import com.bsfcs.rag.entity.Contractjxfpdj;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ContractjxfpdjRepository extends JpaRepository<Contractjxfpdj, String> {
    

    
    /**
     * 根据多个合同ID查询进项发票记录
     */
    @Query("SELECT i FROM Contractjxfpdj i WHERE i.contract_id IN :contractIds ORDER BY i.contract_id, i.bill_date DESC")
    List<Contractjxfpdj> findByContractIds(@Param("contractIds") List<String> contractIds);
    

}